package com.gcj.demo.controller;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hello")
public class helloAPI {
    private static final Logger logger = LoggerFactory.getLogger("sys-user");
    private static final Logger nice = LoggerFactory.getLogger("sys-nice");
    @GetMapping("/getHello")
    public String getHello(){
        logger.info("====关闭会话验证任务====");
        nice.info("====关闭会话验证任务====景哥牛逼！！！！");
        return "景哥牛逼";
    }


    /**
     * 获取properties key值
     * @param key
     * @return
     */

    @GetMapping("/getkey")
    public String getkey(String key){


         new PropertiesUtil().init();
        return PropertiesUtil.get(key);
    }
    /**
     * 修改properties value值
     * @param key
     * @return
     */
    @GetMapping("/putkey")
    public String putkey(String key,String value){
        new PropertiesUtil().init();
        PropertiesUtil.put(key,value);
        return PropertiesUtil.get(key);
    }
}
